Using Destination Tags for Choosing Routing Destinations

You can use Dial Plans (see Configuring Dial Plans) or Call Setup Rules (seeConfiguring Call Setup Rules) to define tags for determining destination IP Groups for routing incoming calls.

One of the benefits of using tags is that it can reduce the number of IP-to-IP Routing rules that you would normally need to configure. For example, assume that you need to route calls from IP Group "A" to two different IP Groups, "B" and "C", based on called (destination) prefix number (e.g., 102 and 103). When not using tags, you would need to configure two IP-to-IP Routing rules, where one rule sends calls with prefix number 102 to IP Group "B" and another rule sends calls with prefix number 103 to IP Group "C". When using tags, you would only need to configure a single IP-to-IP Routing rule whose destination IP Group is based on a tag.

The following briefly describes the tag-based routing process:

Using Dial Plans for Determining Destination Tags:
a. The device searches the Dial Plan index that is associated with the source IP Group of the incoming SIP dialog, for a Dial Plan rule whose 'Prefix' parameter is configured with the same called prefix number as the SIP dialog (e.g., 102). If found, the device inspects the tags in the Dial Plan rule's 'Tag' parameter (e.g., "Country=England;City=London;Essex").
b. The device searches for a matching rule in the IP-to-IP Routing table and if the 'Destination Type' parameter is configured to Destination Tag, it checks the tag name configured in the 'Routing Tag Name' parameter and compares it with the tags found in the Dial Plan rule. If the parameter is configured to "default", the device selects the first tag name in the Dial Plan rule that is configured without a value (e.g., "Holland" in Step 1 below). If the parameter is configured with a tag name (e.g., "Country"), the device selects the tag name with its value (e.g., "Country=England") in the Dial Plan rule.
c. The device searches the IP Groups table and IP Group Set table for an IP Group whose 'Tags' parameter is configured with the same tag as configured for the matching IP-to-IP Routing rule. If found, the device routes the call to this IP Group.
Using Call Setup Rules for Determining Destination Tags:
a. The device runs the Call Setup Rule Set ID that is assigned to the 'Pre Route Call Setup Rules Set ID' parameter of the matching IP-to-IP Routing rule ('Destination Type' parameter is Destination Tag). The Call Setup Rule Set determines the destination tag name (e.g., DstTags.Country in the 'Action Subject' parameter of the Call Setup Rule).
b. The device checks if the resultant tag name equals the tag name in the 'Routing Tag Name' parameter of the IP-to-IP Routing rule. If the parameter is configured to "default", the device selects the tag that only has a value (e.g., "Holland"). If the parameter is configured with a tag name (e.g., "Country"), the device selects the tag name with its value (e.g., "Country=England").
c. The device searches the IP Groups table and IP Group Set table for an IP Group whose 'Tags' parameter is configured with the same tag (e.g., "Country=England"), as determined during the routing stage. If found, the device routes the call to the matched IP Group.

The following flow chart shows the device's SIP dialog processing when destination tags are used to determine destination IP Groups:

The following procedure provides an example of how to configure tag-based routing using a Dial Plan and is based on the following scenario:

Calls from IP Group "HQ" with destination (called) prefix number 102 are sent to IP Group "ENG".
Calls from IP Group "HQ" with destination (called) prefix number 103 are sent to IP Group "BEL".
Destination IP Groups are determined by Dial Plan tags:
Tag "Country=England" is used to send calls to IP Group "ENG".
Tag "Country=Belgium" is used to send calls to IP Group "BEL".

For an example of using a Call Setup Rule for tag-based routing, click here.

To configure tag-based routing using Dial Plans:
1. In the Dial Plan table, configure a Dial Plan with Dial Plan rules, where the 'Prefix' parameter is the destination (called) prefix number. In our example, a Dial Plan called "Dial Plan 1" is configured with two Dial Plan rules:

Parameter

Index 0

Index 1

'Name'

UK

Bel-Neth

'Prefix'

102

103

'Tag'

Country=England;City=London

Holland;City=Amsterdam;Country=Belgium

The following displays the configuration in the Web interface of the Dial Plan rule for Index 0:

Regarding the 'Tag' parameter:

Only one tag name without a value can be configured. In the above example, "Holland" is the tag name without a value. For example, configuring "Holland;France", which is two tag names without values is invalid.
Tag names with values (i.e., name=value) must be unique in a Dial Plan rule. In the above example, "Country=England" is a tag name with value. For example, configuring the parameter to "Country=England;Country=Scotland" is invalid. A valid configuration would be "Country=England;Country1=Scotland".
2. In the IP Groups table, configure your IP Groups. Make sure that you assign the source IP Group with the Dial Plan that you configured in Step 1 and that you configure each destination IP Group with one of the required Dial Plan tags. If the tag has a value, include it as well. In our example, we'll configure three IP Groups:

Parameter

Index 0

Index 1

Index 2

'Name '

HQ

ENG

BEL

'Dial Plan'

Dial Plan 1

-

-

'Tags'

-

Country=England

Country=Belgium

3. In the IP-to-IP Routing table (see Configuring SBC IP-to-IP Routing Rules), add a routing rule and configure the 'Destination Type' parameter to Destination Tag and the 'Routing Tag Name' to one of your Dial Plan tag names. In our example, the tag "Country" is used:

Parameter

Index 0

'Name'

Europe

'Source IP Group'

HQ

'Destination Type'

Destination Tag

'Routing Tag Name'

Country

Configure the 'Routing Tag Name' parameter to the name of the tag (without a value, if exists). For example, instead of "Country=England", configure it to "Country" only.
For tag-based routing, if you want to determine the destination tag during the device's routing stage in the IP-to-IP Routing table (i.e., 'Destination Type' set to Destination Tag), use the 'Pre Route Call Setup Rules Set ID' parameter. The device uses the resultant tag name to find a matching IP Group (i.e., with same tag) in the IP Groups table.
In the IP-to-IP Routing table, the device always runs the Call Setup Rules Set of the 'Pre Route Call Setup Rules Set ID' parameter before the Call Setup Rules Set of the 'Call Setup Rules Set ID' parameter (if configured). Therefore, if you're using the 'Pre Route Call Setup Rules Set ID' parameter for tag-based routing, once the Call Setup Rules Set finishes running and the tag and matching IP Group is determined, the device runs the Call Setup Rules Set of the 'Call Setup Rules Set ID' parameter. This second Call Setup Rules Set can now access the already matched IP Group (Param.IPG.Dst).
If the same Dial Plan tag is configured for an IP Group in the IP Groups table and an IP Group Set in the IP Group Set table, the IP Group Set takes precedence and the device sends the SIP dialog to the IP Group(s) belonging to the IP Group Set.